<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul id="list">
      <li>1</li>
      <li>2</li>
      <li>3</li>
      <li>4</li>
    </ul>
    <script>
      /*
      getElementsByTagName 实时，修改视图（html）内容，获取元素对象的变量会同步发生变化
      */
      const lis1 = document.querySelectorAll("li");
      const lis2 = document.getElementsByTagName("li");
    </script>
  </body>
</html>
